/*
 * @Author: huangtianyang 916072572@qq.com
 * @Date: 2023-11-10 10:36:23
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2024-06-04 15:01:00
 * @FilePath: \driving-training-admin\src\router\index.ts
 */
import { createRouter, createWebHistory, Router } from 'vue-router'
import Layout from '@/layout/Index.vue'
/**
 * 创建路由数组
 */
const routes: any[] = [
    {
        path: '',
        name: 'main',
        component: Layout,
        redirect: 'index'
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('@/views/login/Index.vue')
    },
    {
        path: '/',
        name: 'home',
        component: Layout,
        children: [
            {
                path: '/index',
                name: 'index',
                component: () => import('@/views/index/Index.vue'),
                meta: {
                    title: '首页'
                }
            }
        ]
    },

    // {
    //     path: '/driving-school',
    //     name: 'driving-school',
    //     component: Layout,
    //     meta: {
    //         title: '驾校管理',
    //         icon: 'Grid'
    //     },
    //     children: [
    //         {
    //             path: '/driving-school',
    //             name: 'driving-school-list',
    //             component: () => import('@/views/drivingSchoolManagement/drivingSchool/list/Index.vue'),
    //             meta: {
    //                 title: '驾校列表'
    //             }
    //         },
    //         {
    //             path: '/coach',
    //             name: 'coach-list',
    //             component: () => import('@/views/drivingSchoolManagement/coach/list/Index.vue'),
    //             meta: {
    //                 title: '教练列表'
    //             }
    //         },
    //         {
    //             path: '/shop',
    //             name: 'shop-list',
    //             component: () => import('@/views/drivingSchoolManagement/shop/Index.vue'),
    //             meta: {
    //                 title: '门店列表'
    //             }
    //         },
    //         {
    //             path: '/district',
    //             name: 'district-list',
    //             component: () => import('@/views/drivingSchoolManagement/district/Index.vue'),
    //             meta: {
    //                 title: '片区列表'
    //             }
    //         }
    //     ]
    // },
    // {
    //     path: '/class',
    //     name: 'class-manage',
    //     component: Layout,
    //     meta: {
    //         title: '班别管理',
    //         icon: 'List'
    //     },
    //     children: [
    //         {
    //             path: '/class',
    //             name: 'class-list',
    //             component: () => import('@/views/classManagement/class/list/Index.vue'),
    //             meta: {
    //                 title: '班别列表'
    //             }
    //         },
    //         {
    //             path: '/learnDrivingTypeList',
    //             name: 'learnDrivingTypeList-list',
    //             component: () => import('@/views/classManagement/learnDrivingTypeList/list/Index.vue'),
    //             meta: {
    //                 title: '学车类型列表'
    //             }
    //         }
    //     ]
    // },
    // {
    //     path: '/siteManagement-list',
    //     name: 'siteManagement',
    //     component: Layout,
    //     meta: {
    //         title: '场地管理',
    //         icon: 'Promotion'
    //     },
    //     children: [
    //         {
    //             path: '/siteManagement-list',
    //             name: 'siteManagement-list',
    //             component: () => import('@/views/siteManagement/list/Index.vue'),
    //             meta: {
    //                 title: '场地列表'
    //             }
    //         }
    //     ]
    // },
    // {
    //     path: '/question-list',
    //     name: 'question',
    //     component: Layout,
    //     meta: {
    //         title: '问答管理',
    //         icon: 'QuestionFilled'
    //     },
    //     children: [
    //         {
    //             path: '/question-list',
    //             name: 'question-list',
    //             component: () => import('@/views/questionManagement/list/Index.vue'),
    //             meta: {
    //                 title: '问答列表'
    //             }
    //         },
    //         {
    //             path: '/FAQ',
    //             name: 'FAQ',
    //             component: () => import('@/views/questionManagement/FAQ/Index.vue'),
    //             meta: {
    //                 title: '常见问题'
    //             }
    //         }
    //     ]
    // },
    // {
    //     path: '/order',
    //     name: 'order',
    //     component: Layout,
    //     meta: {
    //         title: '订单管理',
    //         icon: 'List'
    //     },
    //     children: [
    //         {
    //             path: '/order',
    //             name: 'order-list',
    //             component: () => import('@/views/orderManagement/list/Index.vue'),
    //             meta: {
    //                 title: '订单列表'
    //             }
    //         }
    //     ]
    // },
    // {
    //     path: '/bill',
    //     name: 'finance',
    //     component: Layout,
    //     meta: {
    //         title: '财务管理',
    //         icon: 'Stamp'
    //     },
    //     children: [
    //         {
    //             path: '/bill',
    //             name: 'bill-list',
    //             component: () => import('@/views/finance/bill/Index.vue'),
    //             meta: {
    //                 title: '账单列表'
    //             }
    //         },
    //         {
    //             path: '/refund',
    //             name: 'refund-list',
    //             component: () => import('@/views/finance/refund/Index.vue'),
    //             meta: {
    //                 title: '退款列表'
    //             }
    //         }
    //     ]
    // },

    // {
    //     path: '/channel-list',
    //     name: 'channel',
    //     component: Layout,
    //     meta: {
    //         title: '渠道管理',
    //         icon: 'BrushFilled'
    //     },
    //     children: [
    //         {
    //             path: '/channel-list',
    //             name: 'channel-list',
    //             component: () => import('@/views/channel/list/Index.vue'),
    //             meta: {
    //                 title: '渠道列表'
    //             }
    //         }
    //     ]
    // },
    // {
    //     path: '/clue-list',
    //     name: 'clue',
    //     component: Layout,
    //     meta: {
    //         title: '线索管理',
    //         icon: 'BellFilled'
    //     },
    //     children: [
    //         {
    //             path: '/clue-list',
    //             name: 'clue-list',
    //             component: () => import('@/views/clueManagement/clue/Index.vue'),
    //             meta: {
    //                 title: '运营线索'
    //             }
    //         },
    //         {
    //             path: '/client-library',
    //             name: 'client-library',
    //             component: () => import('@/views/clueManagement/client-library/Index.vue'),
    //             meta: {
    //                 title: '客户库'
    //             }
    //         }
    //     ]
    // },
    // {
    //     path: '/enterprise-role-list',
    //     name: 'enterprise',
    //     component: Layout,
    //     meta: {
    //         title: '企业管理',
    //         icon: 'BellFilled'
    //     },
    //     children: [
    //         {
    //             path: '/enterprise-role-list',
    //             name: 'enterprise-role-list',
    //             component: () => import('@/views/enterpriseManagement/role/Index.vue'),
    //             meta: {
    //                 title: '角色管理'
    //             }
    //         },
    //         {
    //             path: '/enterprise-user-list',
    //             name: 'enterprise-user-list',
    //             component: () => import('@/views/enterpriseManagement/user/Index.vue'),
    //             meta: {
    //                 title: '用户管理'
    //             }
    //         }
    //     ]
    // },
    // {
    //     path: '/protocol-list',
    //     name: 'system',
    //     component: Layout,
    //     meta: {
    //         title: '系统管理',
    //         icon: 'Tools'
    //     },
    //     children: [
    //         {
    //             path: '/protocol-list',
    //             name: 'protocol-list',
    //             component: () => import('@/views/system/protocol/list/Index.vue'),
    //             meta: {
    //                 title: '协议配置'
    //             }
    //         },
    //         {
    //             path: '/dict-list',
    //             name: 'dict-list',
    //             component: () => import('@/views/system/dict/list/Index.vue'),
    //             meta: {
    //                 title: '字典管理'
    //             }
    //         },
    //         {
    //             path: '/menu',
    //             name: 'menu',
    //             component: () => import('@/views/system/menu/Index.vue'),
    //             meta: {
    //                 title: '菜单管理'
    //             }
    //         }
    //     ]
    // },
    // {
    //     path: '/images',
    //     name: 'images',
    //     component: Layout,
    //     meta: {
    //         title: '其它管理',
    //         icon: 'ChromeFilled'
    //     },
    //     children: [
    //         {
    //             path: '/images',
    //             name: 'images-list',
    //             component: () => import('@/views/mini/Index.vue'),
    //             meta: {
    //                 title: '图片上传'
    //             }
    //         },
    //         {
    //             path: '/avatar',
    //             name: 'avatar-list',
    //             component: () => import('@/views/mini/Avatar.vue'),
    //             meta: {
    //                 title: '随机头像管理'
    //             }
    //         }
    //         // {
    //         //     path: '/serviceUrl',
    //         //     name: 'serviceUrl',
    //         //     component: () => import('@/views/mini/serviceUrl.vue'),
    //         //     meta: {
    //         //         title: '客服地址'
    //         //     }
    //         // },
    //     ]
    // },
    {
        name: 'operation',
        component: Layout,
        children: [
            {
                path: '/FAQs-details',
                name: 'FAQs-details',
                component: () => import('@/views/questionManagement/FAQs/details/Index.vue'),
                meta: {
                    title: '问答详情',
                    hidden: true,
                    activePath: '/FAQs'
                }
            },
            {
                path: '/dict-details',
                name: 'dict-details',
                component: () => import('@/views/system/dict/detail/Index.vue'),
                meta: {
                    title: '字典详情',
                    hidden: true,
                    activePath: '/dict-list'
                }
            },
            {
                path: '/class/operation',
                name: 'class-operation',
                component: () => import('@/views/classManagement/class/edit/Index.vue'),
                meta: {
                    title: '班别编辑',
                    hidden: true,
                    activePath: '/class'
                }
            },
            {
                path: '/learnDrivingTypeList/operation',
                name: 'learnDrivingTypeList-operation',
                component: () => import('@/views/classManagement/learnDrivingTypeList/edit/Index.vue'),
                meta: {
                    title: '学车类型编辑',
                    hidden: true,
                    activePath: '/learnDrivingTypeList'
                }
            },
            {
                path: '/driving-school/operation',
                name: 'driving-school-operation',
                component: () => import('@/views/drivingSchoolManagement/drivingSchool/edit/Index.vue'),
                meta: {
                    title: '驾校编辑',
                    hidden: true,
                    activePath: '/driving-school'
                }
            },
            {
                path: '/coach/operation',
                name: 'coach-operation',
                component: () => import('@/views/drivingSchoolManagement/coach/edit/Index.vue'),
                meta: {
                    title: '教练编辑',
                    hidden: true,
                    activePath: '/coach'
                }
            },
            {
                path: '/subject/operation',
                name: 'subject-operation',
                component: () => import('@/views/siteManagement/edit/Index.vue'),
                meta: {
                    title: '场地编辑',
                    hidden: true,
                    activePath: '/siteManagement-list'
                }
            },
            {
                path: '/order/detailed',
                name: 'order-detailed',
                component: () => import('@/views/orderManagement/detailed/Index.vue'),
                meta: {
                    title: '订单详情',
                    hidden: true,
                    activePath: '/order'
                }
            },
            {
                path: '/protocol/edit',
                name: 'protocol-edit',
                component: () => import('@/views/system/protocol/edit/Index.vue'),
                meta: {
                    title: '新增协议',
                    hidden: true,
                    activePath: '/protocol-list'
                }
            }
        ]
    }
]

/**
 * 创建History路由
 */
const router: Router = createRouter({
    history: createWebHistory(),
    routes
})

export default router
